<template>
  <h1>{{ msg }}</h1>
  <p>
    <a href="https://vitejs.dev/guide/features.html" target="_blank">
      Vite Documentation
    </a>
    |
    <a href="https://v3.vuejs.org/" target="_blank">Vue 3 Documentation</a>
  </p>

  <button type="button" @click="state.count++">
    count is: {{ state.count }}
  </button>
   <button type="button" @click="getUser">点击请求接口</button>
  <p>
    Edit
    <code>components/HelloWorld.vue</code> to test hot module replacement.
  </p>
</template>

<script setup>
import {getUserList} from "../api/user"
import { defineProps, reactive } from "vue";

defineProps({
  msg: String,
});
const getUser=()=>{
  getUserList({page:1,pageSize:10}).then(res=>{
  console.log(res)
  }).catch(err=>{
    console.log(err)
  })
}

const state = reactive({ count: 0 });
</script>

<style scoped>
a {
  color: #42b983;
}
</style>
